package edu.sctu.xialei.May.day20150512one;

/**
* Created by Administrator on 2015/5/13 0013.
*/
public class ValueToSet {

    public StudentData[] setValue() {

        int counterPeople = 0;
        int population = 10;

        StudentData []datas = new StudentData[population];

        for (String name = "小明"; counterPeople < population; counterPeople++ ) {

            StudentData data = new StudentData();

            data.name = name + "的同学";
            data.grade = (float) (55.9 + counterPeople);

            if(counterPeople % 2 == 0){
                data.sex = "男生";
            }
            else {
                data.sex = "女生";
            }

            datas[counterPeople] = data;
            name = data.name;
        }
        return datas;
    }


}


